Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix component URL if bundled within the forc tarball (#654) #664

Closed
wants to merge 2 commits into from

Conversation

alfiedotwtf
Copy link
Contributor

This PR fixes components that are bundled within the forc tarball...

From the following shell session, we can see that when we proxy out to forc tx which then triggers a download, we trying to download the component from an incorrect URL:

> rm -Rf ~/.fuelup
> rm -f fuel-toolchain.toml
> curl https://install.fuel.network | sh
...

> cat fuel-toolchain.toml
[toolchain]
channel = "nightly-2024-09-15"

[components]
forc = "0.62.0"
fuel-core = "0.33.0"
forc-tx = "0.61.0"

> fuelup show
Default host: x86_64-unknown-linux-gnu
fuelup home: /home/alfie/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)

active toolchain
----------------
nightly-2024-09-15-x86_64-unknown-linux-gnu (override), path: fuel-toolchain.toml
  forc : not found
    - forc-client
      - forc-deploy : not found
      - forc-run : not found
    - forc-crypto : not found
    - forc-debug : not found
    - forc-doc : not found
    - forc-fmt : not found
    - forc-lsp : not found
    - forc-tx : not found
    - forc-wallet : not found
  fuel-core : not found
  fuel-core-keygen : not found

> forc --version
Caching fuels version at /home/alfie/.fuelup/store/forc-0.62.0/fuels_version
Fetching binary from https://github.com/FuelLabs/sway/releases/download/v0.62.0/forc-binaries-linux_amd64.tar.gz
Downloading component forc without verifying checksum
...
forc 0.62.0

> fuelup show
Default host: x86_64-unknown-linux-gnu
fuelup home: /home/alfie/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)
nightly-2024-09-15-x86_64-unknown-linux-gnu (override)

active toolchain
----------------
nightly-2024-09-15-x86_64-unknown-linux-gnu (override), path: fuel-toolchain.toml
  forc : 0.63.5+nightly.20240915.e1a05fccec
    - forc-client
      - forc-deploy : not found
      - forc-run : not found
    - forc-crypto : not found
    - forc-debug : not found
    - forc-doc : not found
    - forc-fmt : not found
    - forc-lsp : not found
    - forc-tx : not found
    - forc-wallet : 0.9.0+nightly.20240915.29d9b25c2c
  fuel-core : 0.35.0+nightly.20240915.8c67681a5b
  fuel-core-keygen : 0.35.0+nightly.20240915.8c67681a5b

> forc run --version
forc-client 0.62.0

> forc fmt --version
forc-fmt 0.62.0

> forc tx --version
Fetching binary from https://github.com/FuelLabs/sway/releases/download/v0.61.0/forc-binaries-x86_64-unknown-linux-gnu.tar.gz
Downloading component forc-tx without verifying checksum
Failed to download from https://github.com/FuelLabs/sway/releases/download/v0.61.0/forc-binaries-x86_64-unknown-linux-gnu.tar.gz
Retrying..
Failed to download from https://github.com/FuelLabs/sway/releases/download/v0.61.0/forc-binaries-x86_64-unknown-linux-gnu.tar.gz
Retrying..
Failed to download from https://github.com/FuelLabs/sway/releases/download/v0.61.0/forc-binaries-x86_64-unknown-linux-gnu.tar.gz
Retrying..
Failed to download forc-binaries-x86_64-unknown-linux-gnu.tar.gz - Could not download file. The release may not be ready yet.

> fuel-core --version
Fetching binary from https://github.com/FuelLabs/fuel-core/releases/download/v0.33.0/fuel-core-0.33.0-x86_64-unknown-linux-gnu.tar.gz
Downloading component fuel-core without verifying checksum
...
fuel-core 0.33.0

> fuelup show
Default host: x86_64-unknown-linux-gnu
fuelup home: /home/alfie/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)
nightly-2024-09-15-x86_64-unknown-linux-gnu (override)

active toolchain
----------------
nightly-2024-09-15-x86_64-unknown-linux-gnu (override), path: fuel-toolchain.toml
  forc : 0.63.5+nightly.20240915.e1a05fccec
    - forc-client
      - forc-deploy : not found
      - forc-run : not found
    - forc-crypto : not found
    - forc-debug : not found
    - forc-doc : not found
    - forc-fmt : not found
    - forc-lsp : not found
    - forc-tx : not found
    - forc-wallet : 0.9.0+nightly.20240915.29d9b25c2c
  fuel-core : 0.35.0+nightly.20240915.8c67681a5b
  fuel-core-keygen : 0.35.0+nightly.20240915.8c67681a5b

> ls -l ~/.fuelup/toolchains/
total 8
drwxr-xr-x 3 alfie 4096 Sep 29 07:42 latest-x86_64-unknown-linux-gnu
drwxr-xr-x 3 alfie 4096 Sep 29 07:48 nightly-2024-09-15-x86_64-unknown-linux-gnu

> ls -l ~/.fuelup/store/
total 40
drwxr-xr-x 2 alfie 4096 Sep 29 07:48 forc-0.62.0
drwxr-xr-x 2 alfie 4096 Sep 29 07:48 forc-0.63.5+nightly.20240915.e1a05fccec
drwxr-xr-x 2 alfie 4096 Sep 29 07:42 forc-0.64.0
drwxr-xr-x 2 alfie 4096 Sep 29 07:50 fuel-tx-0.61.0
drwxr-xr-x 2 alfie 4096 Sep 29 07:48 forc-wallet-0.9.0+nightly.20240915.29d9b25c2c
drwxr-xr-x 2 alfie 4096 Sep 29 07:42 forc-wallet-0.9.1
drwxr-xr-x 2 alfie 4096 Sep 29 07:50 fuel-core-0.33.0
drwxr-xr-x 2 alfie 4096 Sep 29 07:48 fuel-core-0.35.0+nightly.20240915.8c67681a5b
drwxr-xr-x 2 alfie 4096 Sep 29 07:42 fuel-core-0.36.0
drwxr-xr-x 2 alfie 4096 Sep 29 07:48 fuel-core-keygen-0.35.0+nightly.20240915.8c67681a5b
drwxr-xr-x 2 alfie 4096 Sep 29 07:42 fuel-core-keygen-0.36.0

> ls -l /home/alfie/.fuelup/store/forc-tx-0.61.0
total 0

@alfiedotwtf alfiedotwtf self-assigned this Sep 28, 2024
@alfiedotwtf alfiedotwtf added bug Something isn't working fuelup labels Sep 28, 2024
@fuel-service-user
Copy link
Contributor

fuel-service-user commented Sep 28, 2024

LCOV of commit 7fb6275 during CI #2042

Summary coverage rate:
  lines......: 82.0% (2321 of 2829 lines)
  functions..: 44.5% (364 of 818 functions)
  branches...: 59.0% (282 of 478 branches)

Files changed coverage rate: n/a

@alfiedotwtf
Copy link
Contributor Author

Closing in favour of in-coming PRs

@alfiedotwtf alfiedotwtf closed this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuelup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants